Droppeing a text file to the field "input"
creates another new field when the file selected
is a text file with the ending ".txt".

The "dragdrop" messages is ignored.


---

# Script: Test script for drag and drop
# DT: 230309-1100
# User: RH
# Desc: Dragdrop message not received

local sPaneColor = "white"
local sPaneColorEnter = "255,231,256"

on dragdrop
   put CR& "dragDrop" after field "output"
   put the dragData["files"] into tDragData
   set the text of me to tDragData
   set the backgroundcolor of me to sPaneColor
end dragdrop

on dragEnter
   put CR& "dragEnter" after field "output"
   put keys(the dragData) into tKeys
   put CR& tKeys after field "output"
   if "files" is in tKeys then
      set the dragAction to "copy"
      if the result is not empty then put CR&the result after field "output"
      set the backgroundcolor of me to sPaneColorEnter
   else
      set the dragAction to "none"
      if the result is not empty then put CR&the result after field "output"
   end if
end dragEnter

on dragLeave
   put CR& "dragLeave" && the dragAction after field "output"
   set the dragAction to "none"
   put CR& "dragLeave" && the dragAction after field "output"
   set the backgroundcolor of me to sPaneColor
end dragLeave
